//
//  VC2.m
//  SimpleLogIn
//
//  Created by dllo on 16/5/11.
//  Copyright © 2016年 jcl. All rights reserved.
//

#import "VC2.h"

@interface VC2 ()

@end

@implementation VC2

- (void)viewDidLoad {
    [super viewDidLoad];
   

    [self ctrateWelcome];


}

- (void)ctrateWelcome {
    
    
    self.navigationItem.title = @"欢迎页";
    
    
    UIButton *buttonBack = [[UIButton alloc]initWithFrame:CGRectMake(0, 0, 60, 40)];
    
    buttonBack.center = self.view.center;
    
    buttonBack.backgroundColor = [UIColor redColor];
    
    [buttonBack setTitle:@"返回" forState:UIControlStateNormal];
    
    [self.view addSubview:buttonBack];
    
    
    [buttonBack addTarget:self action:@selector(handleBack:) forControlEvents:UIControlEventTouchUpInside];
    
    
    
}

- (void)handleBack:(UIButton *)back {
    
    
    [self.navigationController popToViewController:self.navigationController.viewControllers[0] animated:YES];
    
    
    
    
    
    
    
}






@end
